	<?php 
		$ci= &get_instance();	
		$itemArray = $ci->advertising_entity->getListAdvertising();
	?>
	
	<div class="clrboth"></div>
	<h3>Advertising</h3>
	<?php $buttons = array('buttons'=>array('Add#add_advertising();') );?>
	<?php $this->load->view('admin/partials/buttons', $buttons ); ?>

	<div class="clrboth"></div>
	
	<table border="0" class="table-list">
		<thead>
			<tr>
				<th>Image</th>
				<th>Position</th>
				<th>No. Click</th>
				<th>Status</th>
				<th><?php echo lang('dataman.manage'); ?></th>
			</tr>
		</thead>
		
		<tbody>
			<?php foreach( $itemArray as $item ): ?>
			<?php 
				$ADV = $ci->advertising_entity->init('id', $item->id); 
			?>
			<tr>
				<td><?php echo thumb($ADV->getAdvImage(),100,50);?></td>
				<td><?php echo $ADV->getPosition(); ?></td>
				<td><?php echo $ADV->getClick(); ?></td>
				<td>
					<a href="javascript:void(0);" onclick="adv_status(<?php echo $ADV->getId();?>)">
						<?php echo $ADV->getStatus(); ?>
					</a>	
				</td>
				<td>
					<a href="javascript:void(0);" onclick="adv_edit(<?php echo $ADV->getId();?>)"><?php echo lang('dataman.edit');?></a>
					&nbsp;|&nbsp;
					<a href="javascript:void(0);" onclick="adv_delete(<?php echo $ADV->getId();?>)" ><?php echo lang('dataman.delete');?></a>
				</td>
			</tr>
			<?php endforeach; ?>
		</tbody>
	</table>


